//
//  File.swift
//  CooperSwift
//
//  Created by 计海峰 on 2021/10/13.
//

import Foundation

public extension Optional {
    
    func apply(_ block: @escaping (Wrapped)->Void) {
        if nil != self {
            self.map { Wrapped in
                block(Wrapped)
            }
        }
    }
    
}
